package tijava.container.type;

/**
 * 一个重写了equals的可比较类
 * 
 * @see EqualsType
 * @see ComparableType
 * @author nathan
 * 
 */
public class EqualsComparableType extends ComparableType {
	public EqualsComparableType() {
		super();
	}

	public EqualsComparableType(char primary, int secondary, String item) {
		super(primary, secondary, item);
	}

	/**
	 * 无法使用多重继承，只好使用委托实现了
	 */
	public boolean equals(Object o) {
		return new EqualsType(this.primary, this.secondary, this.item)
				.equals(o);
	}
}
